package oj;

import java.util.Scanner;

public class Day18F {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int n1=1;
        int n2=1;
        int n3=0;
        if(n==1 || n==2){
            System.out.println(1);
        }
        for (int i = 3; i <= n ; i++) {
            n3=n1+n2;
            n1=n2;
            n2=n3;
        }
        System.out.println(n3);
    }
}
